package cn.huanzi.qch.baseadmin.ecco.home.repository;

import cn.huanzi.qch.baseadmin.ecco.home.pojo.Note;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface NoteRepository extends JpaRepository<Note, Long> {

    List<Note> findAllByFilename(String filename);

    @Query(nativeQuery = true, value = "SELECT count(*) number,featurename name FROM note group by featureid")
    List findSQL();
}

